#!/bin/sh

# <C-x> prefix
while read file
do
        case "$1" in
        "r")
                convert -rotate 90 "$file" "$file" ;;
        "R")
                convert -rotate -90 "$file" "$file" ;;
        "c")
                echo -n "$file" | xsel -b &&
                notify-send "$file copied to clipboard" & ;;
        "C")
                readlink -f "$file" | xsel -b &&
			    notify-send "$(readlink -f "$file") copied to clipboard" & ;;
        "d")
			    mv "$file" /home/ring/tem/ ;;
        "b")
			    feh --recursive --randomize --bg-fill --no-fehbg "$file" ;;
        "o")
			    dragon-drop -a -x "$file" ;;
        esac
done
